#include <algorithm>
#include <bits/stdc++.h>
using namespace std;

class Solution {
public:
    bool canJump(vector<int>& nums) {
        int size = nums.size();
        int max_far = 0;
        for(int i=0; i<size; ++i){
            if(i<=max_far){
                max_far = max(max_far, nums[i]+i);
                if(max_far >= size-1) return true;
            }
        }
        return false;
    }
};

int main(){

}